Add GazeLockControl Trait to extend control functionality #28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a new Trait called
GazeLockControl
The idea is it extends the functionality of the plugin so you easily see if the current user is the controlling user and define what is hidden in your pages etc based on that logic.
This isn't forced etc, so is up to the user to implement if they want the logic.
For example, take the below, I have an Edit Customer page, where I only want users controlling the page to have the ability to save / delete.
This is something I also saw via #26 so thought I'd give it a whirl at implementing.
Below is an example of how it works in this use case - for example an Edit page:
Here's a Loom of how it works also:
https://www.loom.com/share/f8c66721ff934ea8bba86be8d39af7bc?sid=21cb0f9c-8eb1-47ba-a18b-b6ffe446939c
Let me know if there's any adjustments needed 👍🏻